Ext.define('DragonApp.store.Monster', {
    extend: 'Ext.data.Store',

    alias: 'store.monster',

    model: 'DragonApp.model.Propmonster',
    proxy: {
    type: 'ajax',
    url : './resources/json/acc_dragon_monster.json',
    reader: {
      type: 'json',
      rootProperty: 'RECORDS'
    }
    },
    autoLoad:true,

    listeners: {

      exception: function(proxy, response, operation){
        DragonApp.util.Msg.showErrorMsg(response);
      },

      load: {
        /**
         *@example
         *var param = [
                {'store':Ext.create('DragonApp.store.Quality'),'field_s':'quality','field_m':'id','field_v':'name'},
                {'store':Ext.create('DragonApp.store.MonsterLocation'),'field_s':'location','field_m':'id','field_v':'name'}];

          var myFun = DragonApp.util.Util.transStore(param);
         * @type {Function}
         */
        fn: DragonApp.util.Util.transStore([
                {'store':Ext.create('DragonApp.store.Quality'),'field_s':'quality','field_m':'id','field_v':'name'},
                {'store':Ext.create('DragonApp.store.MonsterLocation'),'field_s':'location','field_m':'id','field_v':'name'}])
      }
    }
 });